package com.whale.springsession.service;

import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component("myel")
public class MyEl {

    public boolean check(Authentication auth, HttpServletRequest request) {
        String name = (String) auth.getPrincipal();
        if (name.equals("anonymousUser")) {
            return false;
        }
        return  true;
    }

}
